package org.grottarossa.ui.core.casemanagement;

public enum EnumListenerType
{
	WORKFLOW(0),
	CASE(1),
	FORMDATA(2);

	private EnumListenerType(int val) {
	}

	public static EnumListenerType getListenerType(int target)
	{
		switch (target)
		{
		case 0:
			return WORKFLOW;
		case 1:
			return CASE;
		case 2:
			return FORMDATA;
		default:
			return CASE;
		}
	}

	public boolean isWorkflowListener()
	{
		switch (this) {
		case WORKFLOW:
			return true;
		}
		return false;
	}

	public boolean isFormDataListener()
	{
		switch (this) {
		case FORMDATA:
			return true;
		}
		return false;
	}

	public boolean isCaseListener()
	{
		switch (this) {
		case CASE:
			return true;
		}
		return false;
	}
}
